package edu.del.teamknowledgebase.common.result;

import lombok.Getter;

@Getter
public enum BusinessCode {

    // 1000 ~ 1999 范围内的业务错误码（可根据模块细分）
    CAPTCHA_ERROR(1001, "验证码错误"),
    CAPTCHA_EXPIRED(1002, "验证码已过期"),
    PARAM_VALID_ERROR(1003, "参数验证失败"),
    CAPTCHA_COOLDOWN(1004, "验证码冷却中"),
    SMS_SEND_TOO_SOON(1005, "验证码发送太快，请稍后再试"),
    SMS_SEND_TOO_FREQUENT(1006, "短信发送太频繁"),
    PHONE_FORMAT_ERROR(1007, "手机号格式错误"),
    PHONE_OR_EMAIL_EMPTY(1008, "手机号或邮箱不能为空"),
    PASSWORD_EMPTY(1009,"密码不能为空"),
    LOGIN_TYPE_EMPTY(1010,"登录方式不能为空"),
    EMAIL_FORMAT_ERROR(1011, "邮箱格式错误"),
    USER_NOT_EXIST(1012,"用户不存在"),
    LOGIN_TYPE_ERROR(1013, "登录方式错误"),
    PASSWORD_ERROR(1014, "密码错误"),
    USER_DISABLED(1015, "用户被禁用"),
    CAPTCHA_EMPTY(1016, "验证码不能为空"),
    PHONE_EMPTY(1017, "手机号不能为空"),
    PASSWORD_LENGTH_ERROR(1018, "密码长度错误"),
    PASSWORD_NOT_EQUAL(1019, "密码不一致"),
    CODE_EMPTY(1020, "验证码不能为空"),
    CODE_ERROR( 1021, "验证码错误"),
    VERIFICATION_CODE_NOT_FOUND( 1022, "验证码不存在"),
    VERIFICATION_CODE_INVALID(1023, "验证码已失效"),
    PHONE_EXIST(1024, "手机号已存在"),
    EMAIL_EXIST(1025, "邮箱已存在"),
    REGISTER_FAILED( 1026, "注册失败"),
    NOT_LOGIN(1027, "用户未登录"),
    SESSION_EXPIRED( 1028, "会话已过期"),
    FILE_EMPTY(1029, "文件不能为空"),
    FILE_TYPE_ERROR(1030, "文件类型错误"),
    FILE_SIZE_ERROR(1031, "文件大小错误"),
    FILE_UPLOAD_ERROR(1032, "文件上传失败"),
    USER_UPDATE_ERROR(1033, "用户更新失败"),
    USERNAME_EXISTS(1034 ,"用户名已存在"),
    OPERATION_TOO_FREQUENT(1035 , "操作过于频繁"),
    EMAIL_EMPTY(1036, "邮箱不能为空"),
    CODE_SEND_ERROR(1037, "验证码发送失败");



    private final Integer code;
    private final String message;

    BusinessCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
